var Index = {
	BANNER_COUNT: 3,
	bannerInit: function(){
		$("#photo").css("background-image", "url('" + (CurrentUser?Core.id2url(CurrentUser):"img/student.png") + "')");
		var level = 
		$("#name").text((CurrentUser?(CurrentUser.name||CurrentUser.username||"游客"):"游客") + " ( " +  (CurrentUser&&CurrentUser.level?STULEVELTEXT[CurrentUser.level]:"门外汉") + " )");
		$("#phone").text(CurrentUser?(CurrentUser.phone||""):"");
		$(".testCtn").text("版本号: " + Core.VERSION);
		var ctnW = $("#bannerCtn").width();
		var touchStartFun = function(){
			clearTimeout(Index.tmo);
		}
		var touchEndFun = function(){
			Index.tmo = setTimeout(function(){
				Index.slide.toNext();
			}, 1000*4);
			$(".switch").css("background-color", "#fff");
			$("#switch"+Index.slide.currentPoint).css("background-color", "#58ad52");
			var $el = $($("#slide").children()[Index.slide.currentPoint]);
		}
		Index.slide = Css3Flip("#slide", touchStartFun, touchEndFun);
		touchEndFun();
		$("#absoluteTitleCtn").removeClass("hide").addClass("ub");
	},
	jump: function(url,title){
		SetLS("tab",{"url":url,"title":title});
		if (url!="tab0"&&!CurrentUser)
			return OpenNewWin('signup',5);
		if (url == "tab3")
			return OpenNewWin("tab3");
		//SendNotification("tab", {"url":url,"title":title});
		PCall("father",'zy_con("content", "' + url + '.html", 0, $("#header").outerHeight(), $("#footer").outerHeight());$("#title").text("' + title + '")');
		OpenNewWin('father');
	},
	userInit: function(){
		CurrentUser = GetLS("user");
		$("#photo").css("background-image", "url('" + (CurrentUser?Core.id2url(CurrentUser):"img/student.png") + "')");
		$("#name").text((CurrentUser?(CurrentUser.name||CurrentUser.username||"游客"):"游客") + " ( " +  (CurrentUser&&CurrentUser.level?STULEVELTEXT[CurrentUser.level]:"门外汉") + " )");
		$("#phone").text(CurrentUser?(CurrentUser.phone||""):"");
	}
}